﻿using AesonBaseFramework.EntityFramework.BaseEntities;
using System;
using System.ComponentModel.DataAnnotations;

namespace AesonIntegrationTestLibrary.DataModel
{
    public class TestEvent : AesonBaseEntity
    {
        #region Private Fields

        private Guid _aesonTestID;
        private DateTime _date;
        private string _message;

        #endregion Private Fields

        #region Public Properties

        public Guid AesonTestID
        {
            get { return _aesonTestID; }
            set
            {
                if (value == _aesonTestID) return;
                _aesonTestID = value;
                OnPropertyChanged();
            }
        }

     
        public DateTime Date
        {
            get { return _date; }
            set
            {
                if (value == _date) return;
                _date = value;
                OnPropertyChanged();
            }
        }

        public string Message
        {
            get { return _message; }
            set
            {
                if (value == _message) return;
                _message = value;
                OnPropertyChanged();
            }
        }

        #endregion Public Properties

        #region Internal Methods

        internal static TestEvent Create(string m, Guid testId)
        {
            return new TestEvent()
            {
                Date = DateTime.Now,
                Message = m,
                AesonTestID = testId
            };
        }

        #endregion Internal Methods
    }
}